package com.cqjtu.store.address.mapper;

import com.cqjtu.store.address.pojo.entity.Address;
import com.cqjtu.store.address.pojo.entity.District;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AddressMapper {
    /**
     * 根据用户编号去查询该用户的地址列表
     */
    List<Address> getList(Integer userId);

    Address getById(Integer id);

    int delete(Integer id);

    int setNunDefalut(Integer id);

    int setDefault(Address address);

    List<District> getDistrictList(Integer parent);

    int count(Integer userId);

    int save(Address address);

    District getByCode(Integer code);

    int update(Address address);
}
